from models import User,Post
from app import app
from flask import request

#http://127.0.0.1:5000/list/2 测试传参
@app.route("/list/<id>")
def list(id):
    return f"this list is {id}"

# http://127.0.0.1:5000/params?page=2 测试传参
@app.route('/params')
def parames():
    data=request.args
    page=request.args.get('page',default=1,type=int)
    return f'this page is {page}'
